#pragma once
template<class iterator, class Ref, class Ptr>
	struct Reverse_iterator
	{
		iterator _it;
		typedef Reverse_iterator<iterator, Ref, Ptr> self;
		Reverse_iterator(iterator it)
			:_it(it)
		{}
		self& operator++()
		{
			--_it;
			return *this;
		}
		self& operator++(int)
		{
			self tmp(*this);
			--_it;
			return tmp;
		}
		self& operator--()
		{
			++_it;
			return *this;
		}
		Ptr  operator->()
		{
			return &(operator*());
		}
		Ref operator*()
		{
			iterator tmp = _it;
			return *(--tmp);
		}
		bool operator!=(const self& s)
		{
			return _it != s._it;
		}
	};